package com.tjec.framework.quartz;

import com.tjec.project.projectWorkbench.service.IBmsProjectService;
import org.springframework.context.annotation.PropertySource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author pangyongfeng
 */

@Component
@PropertySource("classpath:/quartz.properties")
public class ProjectSchedule {
    @Resource
    private IBmsProjectService iBmsProjectService;


//	 生产服务器EC1定时任务:
//	 @Scheduled(cron = "0 30 2 * * ?")
//	 生产服务器EC2定时任务:
//	 @Scheduled(cron = "0 30 1 * * ?")
    @Scheduled(cron = "${project.synchronous.timer}")
    public void cronJob() {
        iBmsProjectService.updateBmsProjectByThirdParty("", true,false);
    }

}
